<?php echo $this->Html->css(array('cake.generic'),null,array('inline'=>false));?>
<table style="width: 100%;">
	<tr>
		<td width="60%">
			<h2><?php echo __d('competitions','Dodaj odpowiedź w serwisie społecznociowym')?></h2>
	
			<?php 
				echo $this->Form->create('CompetitionPost',array('url'=>Router::url( $this->here, true )));
				echo $this->Form->input('content',array('label'=>'Treść odpowiedzi','readonly'=>true,'style'=>'height:350px;','after'=>'skopiuj powyższy tekst i wklej do facebook, google +, tweeter'));
				echo $this->Form->end();
			?>
			
			<div style=" float: left; margin-left: 8px; margin-right: 50px;">
			
				<div id="fb-root"></div>
				<script>(function(d, s, id) {
				  var js, fjs = d.getElementsByTagName(s)[0];
				  if (d.getElementById(id)) return;
				  js = d.createElement(s); js.id = id;
				  js.src = "//connect.facebook.net/pl_PL/all.js#xfbml=1&appId=432513693472330";
				  fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));</script>
				<div class="fb-like" data-href="<?php echo $this->request->data['CompetitionPost']['product_url'];?>" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true" data-action="recommend"></div>
								
			</div>
			<div style=" float: left;  margin-right: 30px;">
			
				<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
				  {lang: 'pl'}
				</script>	
				<div class="g-plusone" data-size="medium" data-href="<?php echo $this->request->data['CompetitionPost']['product_url'];?>"></div>

			</div>
			<div style=" float: left; ">
				<a href="https://twitter.com/share" class="twitter-share-button" data-lang="pl" data-url="<?php echo $this->request->data['CompetitionPost']['product_url'];?>">Tweet</a>
				<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
			</div>					
		</td>
		<td width="40%">
		
		</td>
	</tr>
	
	<tr>
		<td>
			<?php 
				echo $this->Form->create('CompetitionPost',array('url'=>Router::url( $this->here, true )));
				echo $this->Form->input('url',array('label'=>'Adres strony www','after'=>__d('competitions','tutaj podaj adres bloga, forum lub innej strony www'),'class'=>'users_urls'));
				echo $this->Form->end();
			?>
		</td>
		<td>
		
		
		</td>
	</tr>
</table>